<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      .father {
        width: 100%;
        height: 500px;
        background-color: pink;
      }
      .box {
        float: left;
        width: 300px;
        height: 100%;
        background-color: skyblue;
      }
      .left {
        margin-left: -100%;
      }
      .right {
        margin-left: -300px;
      }
      .center {
        height: 100%;
        width: 100%;
        background-color: orange;
      }

      .box1 {
        float: left;
        width: 100%;
        height: 100%;
        padding: 0 300px;
      }
    </style>
  </head>
  <body>
    <!-- 实现三栏布局的方案，两边的宽度固定，中间自适应  -->
    <!-- 网址：https://www.cnblogs.com/webtaotao/p/11031723.html#:~:text=CSS%E5%AE%9E%E7%8E%B0%E4%B8%89%E6%A0%8F%E5%B8%83%E5%B1%80%20%285%E7%A7%8D%29%20%E5%B8%B8%E8%A7%81%E7%9A%84%E5%B8%83%E5%B1%80%E6%96%B9%E5%BC%8F%3A%20float%E5%B8%83%E5%B1%80%E3%80%81Position%E5%AE%9A%E4%BD%8D%E3%80%81table%E5%B8%83%E5%B1%80%E3%80%81%E5%BC%B9%E6%80%A7%20%28flex%29%E5%B8%83%E5%B1%80%E3%80%81%E7%BD%91%E6%A0%BC,%28grid%29%E5%B8%83%E5%B1%80%20%E9%82%A3%E4%B9%88%E6%88%91%E4%BB%AC%E5%B0%B1%E6%98%AF%E7%94%A8%E4%BB%A5%E4%B8%8A5%E7%A7%8D%E6%96%B9%E5%BC%8F%E5%AE%8C%E6%88%90%E4%B8%89%E6%A0%8F%E5%B8%83%E5%B1%80%EF%BC%8C%E4%B8%8D%E8%BF%87%E5%89%8D%E6%8F%90%E6%98%AF%E5%B7%A6%E5%8F%B3%E5%AE%BD%E5%BA%A6%20%28%E5%81%87%E5%A6%82%E5%B7%A6%E5%8F%B3%E5%AE%BD%E5%BA%A6%E4%B8%BA300px%29%2C%E6%95%B4%E4%B8%AA%E9%AB%98%E5%BA%A6%E5%B7%B2%E7%9F%A5%20%28%E5%81%87%E5%A6%82%E9%AB%98%E5%BA%A6%E4%B8%BA100px%29%EF%BC%8C%E4%B8%AD%E9%97%B4%E5%AE%BD%E5%BA%A6%E8%87%AA%E9%80%82%E5%BA%94%201%E3%80%81float%E5%B8%83%E5%B1%80%3A -->
    <!-- 方案一：flex:1布局 -->
    <!-- 圣杯布局：中间100%,father设置padding,son float,position并设置left right -->
    <!-- 双飞翼布局 ：采用的float +margin-->
    <!-- 方案二：float的文字环绕，并不能完全的解决，需要设置margin,还得清除浮动 -->
    <!-- 方案三：position 定位布局 -->
    <!-- 方案四：table布局 father display:table 子盒子全部display:table-cell-->
    <div class="father">
      <div class="box1">
        <div class="center">中间</div>
      </div>
      <div class="left box">左边</div>
      <div class="right box">右边</div>
    </div>
  </body>
</html>
